
<input name="attr_version" type="number" value="1.05"/>
<!-- SKILL FOR UNNATURAL-->
<input name="attr_initial_san" type="hidden" value="1"/>
<input name="attr_initial_con" type="hidden" value="1"/>
<input name="attr_initial_str" type="hidden" value="1"/>
<input name="attr_initial_hp" type="hidden" value="1"/>
<!-- TABS-->
<!-- =============================-->
<input class="type" name="attr_sheet_type" type="hidden" value="pc"/>
<input class="display_string" name="attr_toggles" type="hidden" value=""/>
<!--TABS & LOGO-->
<!-- =============================-->
<div class="tabs grid">
  <!-- Buttons to toggle on GM whisper--><span data-i18n-title="GM Whisper">GM Whisper</span>
  <label class="switch" data-i18-titlen="whisper rolls to gm" title="whisper rolls to gm">
    <input class="whisper-toggle" name="attr_gm_toggle" type="checkbox" value="/w gm"/><span class="slider"></span>
  </label>
  <!-- LOGO--><img alt="Delta Green" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Delta%20Green%202/img/deltagreenlogo.jpg"/>
  <!-- CHARACTER SHEETS--><span data-i18n="Sheet Type">Sheet Type</span>
  <select name="attr_sheet_type">
    <optgroup label="Sheet Type">
      <option data-i18n="pc" value="pc">pc</option>
      <option data-i18n="npc" value="npc">npc</option>
    </optgroup>
  </select>
</div>
<!-- NPC SHEET-->
<!-- =============================-->
<div class="npc">
  <div class="grid">
    <div class="section-header">
      <label data-i18n-title="enter a name for non-player character" title="enter a name for non-player character">
        <input data-i18n-placeholder="character name" name="attr_name" placeholder="Character name" title="@{name}" type="text" value=""/>
      </label>
    </div>
    <div class="grid section-body">
      <label class="row" data-i18n-title="enter npc description" title="enter npc description">
        <textarea name="attr_npc_description" placeholder="description"></textarea>
      </label>
      <button name="strength" data-i18n-title="strength roll" title="strength roll" type="roll" value="@{gm_toggle} &{template:stats} {{header=^{strength}}} {{subheader=@{strength}}} {{dice=[[1d100]]}} {{stat=[[@{strength_score}]]}} {{score=[[@{strength}]]}}">
        <h1 data-i18n="STR">STR</h1>
      </button>
      <label data-i18n-title="strength score" title="strength score">
        <input min="0" name="attr_strength_score" placeholder="-" title="@{strength_score}" type="number" value=" "/>
      </label>
      <button name="constitution" data-i18n-title="constitution roll" title="constitution roll" type="roll" value="@{gm_toggle} &{template:stats} {{header=^{constitution}}} {{subheader=@{constitution}}} {{dice=[[1d100]]}} {{stat=[[@{constitution_score}]]}} {{score=[[@{constitution}]]}}">
        <h1 data-i18n="CON">CON</h1>
      </button>
      <label data-i18n-title="constitution score" title="constitution score">
        <input min="0" name="attr_constitution_score" placeholder="-" title="@{constitution_score}" type="number" value=" "/>
      </label>
      <button name="dexterity" data-i18n-title="dexterity roll" title="dexterity roll" type="roll" value="@{gm_toggle} &{template:stats} {{header=^{dexterity}}} {{subheader=@{dexterity}}} {{dice=[[1d100]]}} {{stat=[[@{dexterity_score}]]}} {{score=[[@{dexterity}]]}}">
        <h1 data-i18n="DEX">DEX</h1>
      </button>
      <label data-i18n-title="dexterity score" title="dexterity score">
        <input data-i18n-placeholder="10" min="0" name="attr_dexterity_score" placeholder="10" title="@{dexterity_score}" type="number" value="10"/>
        <input data-i18n-placeholder="10" min="0" name="attr_dexterity_score" placeholder="10" title="@{dexterity_score}" type="number" value="10"/>
      </label>
      <button name="intelligence" data-i18n-title="intelligence roll" title="intelligence roll" type="roll" value="@{gm_toggle} &{template:stats} {{header=^{intelligence}}} {{subheader=@{intelligence}}} {{dice=[[1d100]]}} {{stat=[[@{intelligence_score}]]}} {{score=[[@{intelligence}]]}}">
        <h1 data-i18n="INT">INT</h1>
      </button>
      <label data-i18n-title="intelligence score" title="intelligence score">
        <input data-i18n-placeholder="10" min="0" name="attr_intelligence_score" placeholder="10" title="@{intelligence_score}" type="number" value="10"/>
        <input data-i18n-placeholder="10" min="0" name="attr_intelligence_score" placeholder="10" title="@{intelligence_score}" type="number" value="10"/>
      </label>
      <button name="power" data-i18n-title="power roll" title="power roll" type="roll" value="@{gm_toggle} &{template:stats} {{header=^{power}}} {{subheader=@{power}}} {{dice=[[1d100]]}} {{stat=[[@{power_score}]]}} {{score=[[@{power}]]}}">
        <h1 data-i18n="POW">POW</h1>
      </button>
      <label data-i18n-title="power score" title="power score">
        <input min="0" name="attr_power_score" placeholder="-" title="@{power_score}" type="number" value=" "/>
      </label>
      <button name="charisma" data-i18n-title="charisma roll" title="charisma roll" type="roll" value="@{gm_toggle} &{template:stats} {{header=^{charisma}}} {{subheader=@{charisma}}} {{dice=[[1d100]]}} {{stat=[[@{charisma_score}]]}} {{score=[[@{charisma}]]}}">
        <h1 data-i18n="CHA">CHA</h1>
      </button>
      <label data-i18n-title="charisma score" title="charisma score">
        <input data-i18n-placeholder="10" min="0" name="attr_charisma_score" placeholder="10" title="@{charisma_score}" type="number" value="10"/>
        <input data-i18n-placeholder="10" min="0" name="attr_charisma_score" placeholder="10" title="@{charisma_score}" type="number" value="10"/>
      </label>
      <h1 data-i18n="HP">HP</h1>
      <label data-i18n-title="enter hit points" title="enter hit points">
        <input class="text-align-left" data-i18n-placeholder="10" name="attr_hit_points" placeholder="10" title="@{hit_points}" type="number" value=""/>
      </label>
      <h1 data-i18n="WP">WP</h1>
      <label data-i18n-title="enter willpower points" title="enter willpower points">
        <input class="text-align-left" data-i18n-placeholder="10" name="attr_willpower_points" placeholder="10" title="@{willpower_points}" type="number" value=""/>
      </label>
      <h1 data-i18n="armor">ARMOR</h1>
      <label data-i18n-title="enter armor text" title="enter armor text">
        <input data-i18n-placeholder="8 points of thick hide" name="attr_armor" placeholder="8 points of thick hide" title="@{armor}" type="text" value=""/>
      </label>
      <h1 data-i18n="skills">skills</h1>
      <div class="repeating-container skills">
        <div class="grid section-header">
          <h2 data-i18n="skill">name</h2>
          <h2 data-i18n="rank">skill %</h2>
          <h2 data-i18n="roll">roll</h2>
        </div>
        <fieldset class="repeating_skills">
          <div class="grid section-skills border-bottom">
            <label data-i18n-title="skill name" title="skill name">
              <input class="center" data-i18n-placeholder="skill name" name="attr_name" placeholder="skill name" title="@{repeating_skills_${x}_name}" type="text" value=""/>
            </label>
            <label data-i18n-title="skill rank" title="skill rank">
              <input data-i18n-placeholder="0" name="attr_rank" title="@{repeating_skills_${x}_rank}" placeholder="0" type="number" value=""/>
            </label>
            <button class="dicefontd10" data-i18n-title="skill roll" name="skill roll" title="skill roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=@{name}}} {{subheader=@{rank}}} {{dice=[[1d100]]}}">k</button>
          </div>
        </fieldset>
      </div>
      <h1 data-i18n="attacks">attacks</h1>
      <div class="repeating-container attacks">
        <div class="grid section-header">
          <h2 data-i18n="weapons">attack</h2>
          <h2 data-i18n="skill %">skill %</h2>
          <h2 data-i18n="base range">base range</h2>
          <h2 data-i18n="damage">damage</h2>
          <h2 data-i18n="armor piercing">armor piercing</h2>
          <h2 data-i18n="lethality_percent %">lethality_percent %</h2>
          <h2 data-i18n="kill radius">kill radius</h2>
          <h2 data-i18n="ammo">ammo</h2>
          <h2 data-i18n="notes">notes</h2>
        </div>
        <fieldset class="repeating_weapons">
          <div class="grid section-weapons border-bottom">
            <label data-i18n-title="undefined input" title="undefined input">
              <input name="attr_weapons" title="@{repeating_weapons_${x}_weapons}" type="text" value=""/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="undefined input" title="undefined input">
              <input name="attr_skill_percent" title="@{repeating_weapons_${x}_skill_percent}" type="number" value=""/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="undefined input" title="undefined input">
              <input name="attr_base_range" title="@{repeating_weapons_${x}_base_range}" type="text" value=""/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="undefined input" title="undefined input">
              <input name="attr_damage" title="@{repeating_weapons_${x}_damage}" type="text" value=""/>
              <input name="attr_hasdamage" title="@{repeating_weapons_${x}_hasdamage}" type="hidden" value="0"/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="undefined input" title="undefined input">
              <input name="attr_armor_piercing" title="@{repeating_weapons_${x}_armor_piercing}" type="text" value=""/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="undefined input" title="undefined input">
              <input name="attr_lethality_percent_percent" title="@{repeating_weapons_${x}_lethality_percent_percent}" type="number" value=""/>
              <input name="attr_haslethality" title="@{repeating_weapons_${x}_haslethality}" type="hidden" value="0"/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="undefined input" title="undefined input">
              <input name="attr_kill_radius" title="@{repeating_weapons_${x}_kill_radius}" type="text" value=""/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="undefined input" title="undefined input">
              <input name="attr_ammo" title="@{repeating_weapons_${x}_ammo}" type="text" value=""/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="undefined input" title="undefined input">
              <input name="attr_notes" title="@{repeating_weapons_${x}_notes}" type="text" value=""/>
            </label>
            <div class="vert-line"></div>
            <button class="dicefontd10" name="weapon" type="roll" title="weapon roll" value="@{gm_toggle} &amp;{template:rolls} {{header=@{attack}}} {{subheader=@{skill_percent}}} {{dice=[[1d100]]}} {{damage=^{damage} [@{damage}](~repeating_weapons_damage)}}">k</button>
            <button class="none" name="roll_damage" type="roll" value="@{gm_toggle} &amp;{template:damage} {{header=@{weapons}}} {{subheader=@{damage}}} {{damage=[[@{damage}]]}}"></button>
            <button class="none" name="roll_lethality_percent" type="roll" value="@{gm_toggle} &amp;{template:lethality_percent} {{header=@{weapons}}} {{subheader=@{lethality_percent_percent}}}{{lethality_percent_rating=[[@{lethality_percent_percent}]]}} {{lethality_percent=[[1d100]]}}"></button>
            <button class="none" name="roll_damage_critical" type="roll" value="@{gm_toggle} &amp;{template:damage} {{header=@{weapons}}} {{subheader=@{damage}}} {{damage=[[@{damage}*2]]}}"></button>
            <button class="none" name="roll_lethality_percent_critical" type="roll" value="@{gm_toggle} &amp;{template:lethality_percent_critical} {{header=@{weapons}}} {{subheader=@{lethality_percent_percent}}} {{lethality_percent_rating=[[@{lethality_percent_percent}*2]]}} {{lethality_percent=[[1d100]]}}"></button>
          </div>
        </fieldset>
      </div>
      <h1 data-i18n="other notes">other notes</h1>
      <div class="repeating-container notes">
        <div class="grid section-header">
          <h2 data-i18n="name">name</h2>
          <h2 data-i18n="notes">notes</h2>
        </div>
        <fieldset class="repeating_other">
          <div class="grid section border-bottom">
            <label data-i18n-title="other notes name" title="other notes name">
              <input data-i18n-placeholder="name" name="attr_name" placeholder="name" title="@{repeating_other_${x}_name}" type="text"/>
            </label>
            <label data-i18n-title="other notes" title="other notes">
              <input data-i18n-placeholder="notes" name="attr_notes" placeholder="notes" title="@{repeating_other_${x}_notes}" type="text"/>
            </label>
          </div>
        </fieldset>
      </div>
    </div>
  </div>
</div>
<!-- PC SHEET-->
<!-- =============================-->
<div class="pc">
  <!--PERSONAL DATA-->
  <div class="grid header-body personal-data border">
    <div class="section-header">
      <h1 data-i18n="personal data" data-i18-title="personal data" title="personal data">personal data</h1>
    </div>
    <div class="section-body">
      <div class="grid section border-bottom">
        <h2 class="aligned-left" data-i18n="1. last name, first name (and alias or code name if applicable)" data-i18-title="1. last name, first name (and alias or code name if applicable)" title="1. last name, first name (and alias or code name if applicable)">1. last name, first name (and alias or code name if applicable)</h2>
        <label data-i18-title="1. last name, first name (and alias or code name if applicable)" title="1. last name, first name (and alias or code name if applicable)">
          <input data-i18-placeholder="name" name="attr_name" placeholder="name" title="${name}" type="text"/>
        </label>
        <div class="vert-line"></div>
        <h2 class="aligned-left" data-i18n="2. profession (rank if applicable)" data-i18-title="2. profession (rank if applicable)" title="2. profession (rank if applicable)">2. profession (rank if applicable)</h2>
        <label data-i18-title="2. profession (rank if applicable)" title="2. profession (rank if applicable)">
          <input data-i18-placeholder="profession" name="attr_profession" placeholder="profession" title="${profession}" type="text"/>
        </label>
        <div class="vert-line"></div>
      </div>
      <div class="grid section border-bottom">
        <h2 class="aligned-left" data-i18n="3. employer" data-i18-title="3. employer" title="3. employer">3. employer</h2>
        <label data-i18-title="3. employer" title="3. employer">
          <input data-i18-placeholder="employer" name="attr_employer" placeholder="employer" title="${employer}" type="text"/>
        </label>
        <div class="vert-line"></div>
        <h2 class="aligned-left" data-i18n="4. nationality and residence" data-i18-title="4. nationality and residence" title="4. nationality and residence">4. nationality and residence</h2>
        <label data-i18-title="4. nationality and residence" title="4. nationality and residence">
          <input data-i18-placeholder="nationality and residence" name="attr_nationality and residence" placeholder="nationality and residence" title="${nationality and residence}" type="text"/>
        </label>
        <div class="vert-line"></div>
      </div>
      <div class="grid section border-bottom">
        <h2 class="aligned-left" data-i18n="5. sex" data-i18-title="5. sex" title="5. sex">5. sex</h2>
        <label data-i18-title="5. sex" title="5. sex">
          <input data-i18-placeholder="sex" name="attr_sex" placeholder="sex" title="${sex}" type="text"/>
        </label>
        <div class="vert-line"></div>
        <h2 class="aligned-left" data-i18n="6. age and d.o.b." data-i18-title="6. age and d.o.b." title="6. age and d.o.b.">6. age and d.o.b.</h2>
        <label data-i18-title="6. age and d.o.b." title="6. age and d.o.b.">
          <input data-i18-placeholder="age" name="attr_age" placeholder="age" title="${age}" type="text"/>
        </label>
        <div class="vert-line"></div>
        <h2 class="aligned-left" data-i18n="7. education and occupational history" data-i18-title="7. education and occupational history" title="7. education and occupational history">7. education and occupational history</h2>
        <label data-i18-title="7. education and occupational history" title="7. education and occupational history">
          <input data-i18-placeholder="education" name="attr_education" placeholder="education" title="${education}" type="text"/>
        </label>
        <div class="vert-line"></div>
      </div>
    </div>
  </div>
  <!--STATISTICAL DATA-->
  <div class="grid header-body statistical-data border">
    <div class="section-header">
      <h1 data-i18n="statistical data" data-i18n-title="statistical data" title="statistical data">statistical data</h1>
    </div>
    <!--STATISTICS-->
    <div class="grid section-body">
      <div class="grid section-stats">
        <h2 class="aligned-left" data-i18n="8. statistics" data-i18n-title="8. statistics" title="8. statistics">8. statistics</h2>
        <div class="vert-line"></div>
        <h2 class="center" data-i18n="score" data-i18n-title="score">score</h2>
        <div class="vert-line"></div>
        <h2 class="center" data-i18n="×5" data-i18n-title="×5">×5</h2>
        <div class="vert-line"></div>
        <h2 class="aligned-left" data-i18n="distinguishing features" data-i18n-title="">distinguishing features</h2>
        <div class="horz-line"></div>
        <button name="strength" data-i18n-title="strength roll" title="strength roll" type="roll" value="@{gm_toggle} &{template:stats} {{header=^{strength}}} {{subheader=@{strength}}} {{dice=[[1d100]]}} {{stat=[[@{strength_score}]]}} {{score=[[@{strength}]]}}">
          <h3 class="aligned-left" data-i18n="strength">strength</h3><span class="para" data-i18n="STR">STR</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="strength score" title="strength score">
          <input min="0" name="attr_strength_score" placeholder="-" title="@{strength_score}" type="number" value=" "/>
        </label>
        <div class="vert-line"></div><span class="center" name="attr_strength" title="@{strength}"></span>
        <div class="vert-line"></div>
        <label data-i18n-title="strength distinguishing features" title="strength distinguishing features">
          <input data-i18n-placeholder="distinguishing features" name="attr_strength_features" placeholder="distinguishing features" title="@{strength_features}" type="text"/>
        </label>
        <input name="attr_strength" type="hidden" value="50"/>
        <div class="horz-line"></div>
        <button name="constitution" data-i18n-title="constitution roll" title="constitution roll" type="roll" value="@{gm_toggle} &{template:stats} {{header=^{constitution}}} {{subheader=@{constitution}}} {{dice=[[1d100]]}} {{stat=[[@{constitution_score}]]}} {{score=[[@{constitution}]]}}">
          <h3 class="aligned-left" data-i18n="constitution">constitution</h3><span class="para" data-i18n="CON">CON</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="constitution score" title="constitution score">
          <input min="0" name="attr_constitution_score" placeholder="-" title="@{constitution_score}" type="number" value=" "/>
        </label>
        <div class="vert-line"></div><span class="center" name="attr_constitution" title="@{constitution}"></span>
        <div class="vert-line"></div>
        <label data-i18n-title="constitution distinguishing features" title="constitution distinguishing features">
          <input data-i18n-placeholder="distinguishing features" name="attr_constitution_features" placeholder="distinguishing features" title="@{constitution_features}" type="text"/>
        </label>
        <input name="attr_constitution" type="hidden" value="50"/>
        <div class="horz-line"></div>
        <button name="dexterity" data-i18n-title="dexterity roll" title="dexterity roll" type="roll" value="@{gm_toggle} &{template:stats} {{header=^{dexterity}}} {{subheader=@{dexterity}}} {{dice=[[1d100]]}} {{stat=[[@{dexterity_score}]]}} {{score=[[@{dexterity}]]}}">
          <h3 class="aligned-left" data-i18n="dexterity">dexterity</h3><span class="para" data-i18n="DEX">DEX</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="dexterity score" title="dexterity score">
          <input data-i18n-placeholder="10" min="0" name="attr_dexterity_score" placeholder="10" title="@{dexterity_score}" type="number" value="10"/>
        </label>
        <div class="vert-line"></div><span class="center" name="attr_dexterity" title="@{dexterity}"></span>
        <div class="vert-line"></div>
        <label data-i18n-title="dexterity distinguishing features" title="dexterity distinguishing features">
          <input data-i18n-placeholder="distinguishing features" name="attr_dexterity_features" placeholder="distinguishing features" title="@{dexterity_features}" type="text"/>
        </label>
        <input name="attr_dexterity" type="hidden" value="50"/>
        <div class="horz-line"></div>
        <button name="intelligence" data-i18n-title="intelligence roll" title="intelligence roll" type="roll" value="@{gm_toggle} &{template:stats} {{header=^{intelligence}}} {{subheader=@{intelligence}}} {{dice=[[1d100]]}} {{stat=[[@{intelligence_score}]]}} {{score=[[@{intelligence}]]}}">
          <h3 class="aligned-left" data-i18n="intelligence">intelligence</h3><span class="para" data-i18n="INT">INT</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="intelligence score" title="intelligence score">
          <input data-i18n-placeholder="10" min="0" name="attr_intelligence_score" placeholder="10" title="@{intelligence_score}" type="number" value="10"/>
        </label>
        <div class="vert-line"></div><span class="center" name="attr_intelligence" title="@{intelligence}"></span>
        <div class="vert-line"></div>
        <label data-i18n-title="intelligence distinguishing features" title="intelligence distinguishing features">
          <input data-i18n-placeholder="distinguishing features" name="attr_intelligence_features" placeholder="distinguishing features" title="@{intelligence_features}" type="text"/>
        </label>
        <input name="attr_intelligence" type="hidden" value="50"/>
        <div class="horz-line"></div>
        <button name="power" data-i18n-title="power roll" title="power roll" type="roll" value="@{gm_toggle} &{template:stats} {{header=^{power}}} {{subheader=@{power}}} {{dice=[[1d100]]}} {{stat=[[@{power_score}]]}} {{score=[[@{power}]]}}">
          <h3 class="aligned-left" data-i18n="power">power</h3><span class="para" data-i18n="POW">POW</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="power score" title="power score">
          <input min="0" name="attr_power_score" placeholder="-" title="@{power_score}" type="number" value=" "/>
        </label>
        <div class="vert-line"></div><span class="center" name="attr_power" title="@{power}"></span>
        <div class="vert-line"></div>
        <label data-i18n-title="power distinguishing features" title="power distinguishing features">
          <input data-i18n-placeholder="distinguishing features" name="attr_power_features" placeholder="distinguishing features" title="@{power_features}" type="text"/>
        </label>
        <input name="attr_power" type="hidden" value="50"/>
        <div class="horz-line"></div>
        <button name="charisma" data-i18n-title="charisma roll" title="charisma roll" type="roll" value="@{gm_toggle} &{template:stats} {{header=^{charisma}}} {{subheader=@{charisma}}} {{dice=[[1d100]]}} {{stat=[[@{charisma_score}]]}} {{score=[[@{charisma}]]}}">
          <h3 class="aligned-left" data-i18n="charisma">charisma</h3><span class="para" data-i18n="CHA">CHA</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="charisma score" title="charisma score">
          <input data-i18n-placeholder="10" min="0" name="attr_charisma_score" placeholder="10" title="@{charisma_score}" type="number" value="10"/>
        </label>
        <div class="vert-line"></div><span class="center" name="attr_charisma" title="@{charisma}"></span>
        <div class="vert-line"></div>
        <label data-i18n-title="charisma distinguishing features" title="charisma distinguishing features">
          <input data-i18n-placeholder="distinguishing features" name="attr_charisma_features" placeholder="distinguishing features" title="@{charisma_features}" type="text"/>
        </label>
        <input name="attr_charisma" type="hidden" value="50"/>
        <div class="horz-line"></div>
      </div>
      <!--DERIVED ATTRIBUTES-->
      <div class="grid section-derived">
        <div class="grid section">
          <h2 class="aligned-left">9. derived attributes</h2>
          <div class="vert-line"></div>
          <h2 class="center">maximum</h2>
          <div class="vert-line"></div>
          <h2 class="center">current</h2>
          <div class="horz-line"></div>
          <div class="derived-attr nbsp">
            <h3 class="aligned-left" data-i18n="hit points" data-i18n-title="hit points">hit points</h3><span class="para" data-i18n="HP">HP</span>
          </div>
          <div class="vert-line"></div><span class="center" name="attr_hit_points_max" title="@{hit_points_max}"></span>
          <div class="vert-line"></div>
          <label data-i18n-title="hit points" title="hit points">
            <input name="attr_hit_points" placeholder="-" title="@{hit_points}" type="number" value=" "/>
          </label>
          <input name="attr_hit_points_max" type="hidden" value="10"/>
          <div class="horz-line"></div>
          <div class="derived-attr nbsp">
            <h3 class="aligned-left" data-i18n="willpower points" data-i18n-title="willpower points">willpower points</h3><span class="para" data-i18n="WP">WP</span>
          </div>
          <div class="vert-line"></div><span class="center" name="attr_willpower_points_max" title="@{willpower_points_max}"></span>
          <div class="vert-line"></div>
          <label data-i18n-title="willpower points" title="willpower points">
            <input name="attr_willpower_points" placeholder="-" title="@{willpower_points}" type="number" value=" "/>
          </label>
          <input name="attr_willpower_points_max" type="hidden" value="10"/>
          <div class="horz-line"></div>
          <button name="SAN" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{SAN}}} {{subheader=@{sanity_points}}} {{dice=[[1d100]]}}">
            <h3 class="aligned-left" data-i18n="sanity points" data-i18n-title="sanity points">sanity points</h3><span class="para" data-i18n="SAN">SAN</span>
          </button>
          <div class="vert-line"></div><span class="center" name="attr_sanity_points_max" title="@{sanity_points_max}"></span>
          <div class="vert-line"></div>
          <label data-i18n-title="sanity points" title="sanity points">
            <input name="attr_sanity_points" placeholder="-" title="@{sanity_points}" type="number" value=" "/>
          </label>
          <input name="attr_sanity_points_max" type="hidden" value="50"/>
          <div class="horz-line"></div>
          <div class="derived-attr nbsp">
            <h3 class="aligned-left" data-i18n="breaking point" data-i18n-title="breaking point">breaking point</h3><span class="para" data-i18n="BP">BP</span>
          </div>
          <div class="vert-line"></div><span class="center" name="attr_breaking_point_max" title="@{breaking_point_max}"></span>
          <div class="vert-line"></div>
          <label data-i18n-title="breaking point" title="breaking point">
            <input name="attr_breaking_point" placeholder="-" title="@{breaking_point}" type="number" value=" "/>
          </label>
          <input name="attr_breaking_point_max" type="hidden" value="40"/>
          <div class="horz-line"></div>
          <button name="Luck" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{luck}}} {{subheader=@{luck}}} {{dice=[[1d100]]}}">
            <h3 class="aligned-left" data-i18n="luck" data-i18n-title="luck">luck</h3>
          </button>
          <div class="vert-line"></div><span class="center" name="attr_luck_max" title="@{luck_max}"></span>
          <div class="vert-line"></div><span class="center" name="attr_luck_max" title="@{luck_max}">
            <input name="attr_luck" placeholder="10" title="@{luck}" type="hidden" value="50"/></span>
          <input name="attr_luck_max" type="hidden" value="50"/>
          <div class="horz-line"></div>
        </div>
      </div>
      <!--PHYSICAL DESCRIPTION-->
      <div class="grid section-physical">
        <h2 class="aligned-left">9. physical description</h2>
        <textarea name="attr_physical_description" placeholder="physical description" title="@{physical_description}"></textarea>
      </div>
    </div>
  </div>
  <!--PSYCHOLOGICAL DATA-->
  <div class="grid header-body pyschological-data border">
    <div class="section-header">
      <h1 data-i18n="pyschological data" data-i18n-title="pyschological data ">pyschological data </h1>
    </div>
    <div class="grid section-body">
      <div class="grid section-bonds">
        <div class="grid section border-bottom max-height">
          <h2 class="aligned-left" data-i18n="11. bonds" data-i18n-title="11. bonds">11. bonds</h2>
          <div class="vert-line"></div>
          <h2 class="center" data-i18n="score" data-i18n-title="score">score</h2>
        </div>
        <div class="repeating-container border-bottom">
          <fieldset class="repeating_bonds">
            <div class="grid section border-bottom">
              <label data-i18n-title="bond name" title="bond name">
                <input name="attr_name" placeholder="bond" title="@{repeating_bonds_${x}_name}" type="text"/>
              </label>
              <div class="vert-line"></div>
              <label data-i18n-title="bond score" title="bond score">
                <input data-i18n-placeholder="-" name="attr_score" placeholder="-" title="@{repeating_bonds_${x}_score}" type="number"/>
                <input name="attr_flag" title="@{repeating_bonds_${x}_flag}" type="hidden" value="0"/>
              </label>
            </div>
          </fieldset>
        </div>
      </div>
      <div class="grid section-motivations">
        <div class="grid section border-bottom">
          <h2 class="aligned-left" data-i18n="12. motivations and mental disorders" data-i18n-title="12. motivations and mental disorders">12. motivations and mental disorders</h2>
          <textarea data-i18n-placeholder="motivations" name="attr_motivations" placeholder="motivations"></textarea>
        </div>
      </div>
      <div class="grid section-incidents">
        <div class="grid section border-bottom">
          <h2 class="aligned-left" data-i18n="13. incidents of san loss without going insane" data-i18n-title="13. incidents of san loss without going insane">13. incidents of san loss without going insane</h2>
        </div>
        <div class="grid section incidents-body">
          <h3 class="center" data-i18n="violence" data-i18n-title="violence">violence</h3>
          <label class="styled-checkbox" data-i18n-title="violence 1" title="violence 1">
            <input name="attr_violence_1" title="@{repeating_bonds_${x}_violence}" type="checkbox" value="1"/>
          </label>
          <label class="styled-checkbox" data-i18n-title="violence 2" title="violence 2">
            <input name="attr_violence_2" title="@{repeating_bonds_${x}_violence}" type="checkbox" value="2"/>
          </label>
          <label class="styled-checkbox" data-i18n-title="violence 3" title="violence 3">
            <input name="attr_violence_3" title="@{repeating_bonds_${x}_violence}" type="checkbox" value="3"/>
          </label><span class="italic" data-i18n="adapted">adapted</span>
          <h3 class="center" data-i18n="helplessness" data-i18n-title="helplessness">helplessness</h3>
          <label class="styled-checkbox" data-i18n-title="helplessness 1" title="helplessness 1">
            <input name="attr_helplessness_1" title="@{repeating_bonds_${x}_helplessness}" type="checkbox" value="1"/>
          </label>
          <label class="styled-checkbox" data-i18n-title="helplessness 2" title="helplessness 2">
            <input name="attr_helplessness_2" title="@{repeating_bonds_${x}_helplessness}" type="checkbox" value="2"/>
          </label>
          <label class="styled-checkbox" data-i18n-title="helplessness 3" title="helplessness 3">
            <input name="attr_helplessness_3" title="@{repeating_bonds_${x}_helplessness}" type="checkbox" value="3"/>
          </label><span class="italic" data-i18n="adapted">adapted</span>
        </div>
      </div>
    </div>
  </div>
  <!--APPLICABLE SKILL SETS-->
  <div class="grid header-body applicable-skill-sets border">
    <div class="section-header">
      <h1 data-i18n="applicable skill sets" data-i18n-title="applicable skill sets">applicable skill sets</h1>
    </div>
    <div class="grid section-body border">
      <div class="grid section-skill-col">
        <label class="styled-checkbox" data-i18n-title="accounting fail checkbox" title="accounting fail checkbox">
          <input name="attr_accounting_fail" title="@{accounting_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="accounting roll" name="accounting" title="accounting roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{accounting}}} {{subheader=@{accounting}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="accounting" title="accounting">accounting</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="accounting rank" title="accounting rank">
          <input data-i18n-placeholder="0" name="attr_accounting" title="@{accounting}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="alertness fail checkbox" title="alertness fail checkbox">
          <input name="attr_alertness_fail" title="@{alertness_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="alertness roll" name="alertness" title="alertness roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{alertness}}} {{subheader=@{alertness}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="alertness" title="alertness">alertness</h3><span data-i18n="(20%)">(20%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="alertness rank" title="alertness rank">
          <input data-i18n-placeholder="0" name="attr_alertness" title="@{alertness}" placeholder="0" type="number" value="20"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="anthropology fail checkbox" title="anthropology fail checkbox">
          <input name="attr_anthropology_fail" title="@{anthropology_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="anthropology roll" name="anthropology" title="anthropology roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{anthropology}}} {{subheader=@{anthropology}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="anthropology" title="anthropology">anthropology</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="anthropology rank" title="anthropology rank">
          <input data-i18n-placeholder="0" name="attr_anthropology" title="@{anthropology}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="archeology fail checkbox" title="archeology fail checkbox">
          <input name="attr_archeology_fail" title="@{archeology_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="archeology roll" name="archeology" title="archeology roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{archeology}}} {{subheader=@{archeology}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="archeology" title="archeology">archeology</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="archeology rank" title="archeology rank">
          <input data-i18n-placeholder="0" name="attr_archeology" title="@{archeology}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="art fail checkbox" title="art fail checkbox">
          <input name="attr_art_fail" title="@{art_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="art roll" name="art" title="art roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{art}}} {{subheader=@{art}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="art" title="art">art</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="art rank" title="art rank">
          <input data-i18n-placeholder="0" name="attr_art" title="@{art}" placeholder="0" type="number" value="0"/>
        </label>
        <label class="custom-label" data-i18n-title="art name" title="art name">
          <textarea data-i18n-placeholder="skill name" name="attr_art_name" placeholder="skill name" title="@{art_name}" value=""></textarea>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="artillery fail checkbox" title="artillery fail checkbox">
          <input name="attr_artillery_fail" title="@{artillery_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="artillery roll" name="artillery" title="artillery roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{artillery}}} {{subheader=@{artillery}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="artillery" title="artillery">artillery</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="artillery rank" title="artillery rank">
          <input data-i18n-placeholder="0" name="attr_artillery" title="@{artillery}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="athletics fail checkbox" title="athletics fail checkbox">
          <input name="attr_athletics_fail" title="@{athletics_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="athletics roll" name="athletics" title="athletics roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{athletics}}} {{subheader=@{athletics}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="athletics" title="athletics">athletics</h3><span data-i18n="(30%)">(30%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="athletics rank" title="athletics rank">
          <input data-i18n-placeholder="0" name="attr_athletics" title="@{athletics}" placeholder="0" type="number" value="30"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="bureaucracy fail checkbox" title="bureaucracy fail checkbox">
          <input name="attr_bureaucracy_fail" title="@{bureaucracy_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="bureaucracy roll" name="bureaucracy" title="bureaucracy roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{bureaucracy}}} {{subheader=@{bureaucracy}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="bureaucracy" title="bureaucracy">bureaucracy</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="bureaucracy rank" title="bureaucracy rank">
          <input data-i18n-placeholder="0" name="attr_bureaucracy" title="@{bureaucracy}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="computer science fail checkbox" title="computer science fail checkbox">
          <input name="attr_computer_science_fail" title="@{computer_science_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="computer science roll" name="computer science" title="computer science roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{computer science}}} {{subheader=@{computer_science}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="computer science" title="computer science">computer science</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="computer science rank" title="computer science rank">
          <input data-i18n-placeholder="0" name="attr_computer_science" title="@{computer_science}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="craft fail checkbox" title="craft fail checkbox">
          <input name="attr_craft_fail" title="@{craft_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="craft roll" name="craft" title="craft roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{craft}}} {{subheader=@{craft}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="craft" title="craft">craft</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="craft rank" title="craft rank">
          <input data-i18n-placeholder="0" name="attr_craft" title="@{craft}" placeholder="0" type="number" value="0"/>
        </label>
        <label class="custom-label" data-i18n-title="craft name" title="craft name">
          <textarea data-i18n-placeholder="skill name" name="attr_craft_name" placeholder="skill name" title="@{craft_name}" value=""></textarea>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="criminology fail checkbox" title="criminology fail checkbox">
          <input name="attr_criminology_fail" title="@{criminology_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="criminology roll" name="criminology" title="criminology roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{criminology}}} {{subheader=@{criminology}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="criminology" title="criminology">criminology</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="criminology rank" title="criminology rank">
          <input data-i18n-placeholder="0" name="attr_criminology" title="@{criminology}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="demolitions fail checkbox" title="demolitions fail checkbox">
          <input name="attr_demolitions_fail" title="@{demolitions_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="demolitions roll" name="demolitions" title="demolitions roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{demolitions}}} {{subheader=@{demolitions}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="demolitions" title="demolitions">demolitions</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="demolitions rank" title="demolitions rank">
          <input data-i18n-placeholder="0" name="attr_demolitions" title="@{demolitions}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="disguise fail checkbox" title="disguise fail checkbox">
          <input name="attr_disguise_fail" title="@{disguise_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="disguise roll" name="disguise" title="disguise roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{disguise}}} {{subheader=@{disguise}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="disguise" title="disguise">disguise</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="disguise rank" title="disguise rank">
          <input data-i18n-placeholder="0" name="attr_disguise" title="@{disguise}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="dodge fail checkbox" title="dodge fail checkbox">
          <input name="attr_dodge_fail" title="@{dodge_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="dodge roll" name="dodge" title="dodge roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{dodge}}} {{subheader=@{dodge}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="dodge" title="dodge">dodge</h3><span data-i18n="(30%)">(30%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="dodge rank" title="dodge rank">
          <input data-i18n-placeholder="0" name="attr_dodge" title="@{dodge}" placeholder="0" type="number" value="30"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="drive fail checkbox" title="drive fail checkbox">
          <input name="attr_drive_fail" title="@{drive_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="drive roll" name="drive" title="drive roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{drive}}} {{subheader=@{drive}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="drive" title="drive">drive</h3><span data-i18n="(20%)">(20%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="drive rank" title="drive rank">
          <input data-i18n-placeholder="0" name="attr_drive" title="@{drive}" placeholder="0" type="number" value="20"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="firearms fail checkbox" title="firearms fail checkbox">
          <input name="attr_firearms_fail" title="@{firearms_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="firearms roll" name="firearms" title="firearms roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{firearms}}} {{subheader=@{firearms}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="firearms" title="firearms">firearms</h3><span data-i18n="(20%)">(20%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="firearms rank" title="firearms rank">
          <input data-i18n-placeholder="0" name="attr_firearms" title="@{firearms}" placeholder="0" type="number" value="20"/>
        </label>
        <div class="horz-line"></div>
      </div>
      <div class="grid section-skill-col">
        <label class="styled-checkbox" data-i18n-title="first aid fail checkbox" title="first aid fail checkbox">
          <input name="attr_first_aid_fail" title="@{first_aid_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="first aid roll" name="first aid" title="first aid roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{first aid}}} {{subheader=@{first_aid}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="first aid" title="first aid">first aid</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="first aid rank" title="first aid rank">
          <input data-i18n-placeholder="0" name="attr_first_aid" title="@{first_aid}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="forensics fail checkbox" title="forensics fail checkbox">
          <input name="attr_forensics_fail" title="@{forensics_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="forensics roll" name="forensics" title="forensics roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{forensics}}} {{subheader=@{forensics}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="forensics" title="forensics">forensics</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="forensics rank" title="forensics rank">
          <input data-i18n-placeholder="0" name="attr_forensics" title="@{forensics}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="heavy machinery fail checkbox" title="heavy machinery fail checkbox">
          <input name="attr_heavy_machinery_fail" title="@{heavy_machinery_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="heavy machinery roll" name="heavy machinery" title="heavy machinery roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{heavy machinery}}} {{subheader=@{heavy_machinery}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="heavy machinery" title="heavy machinery">heavy machinery</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="heavy machinery rank" title="heavy machinery rank">
          <input data-i18n-placeholder="0" name="attr_heavy_machinery" title="@{heavy_machinery}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="heavy weapons fail checkbox" title="heavy weapons fail checkbox">
          <input name="attr_heavy_weapons_fail" title="@{heavy_weapons_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="heavy weapons roll" name="heavy weapons" title="heavy weapons roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{heavy weapons}}} {{subheader=@{heavy_weapons}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="heavy weapons" title="heavy weapons">heavy weapons</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="heavy weapons rank" title="heavy weapons rank">
          <input data-i18n-placeholder="0" name="attr_heavy_weapons" title="@{heavy_weapons}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="history fail checkbox" title="history fail checkbox">
          <input name="attr_history_fail" title="@{history_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="history roll" name="history" title="history roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{history}}} {{subheader=@{history}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="history" title="history">history</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="history rank" title="history rank">
          <input data-i18n-placeholder="0" name="attr_history" title="@{history}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="HUMINT fail checkbox" title="HUMINT fail checkbox">
          <input name="attr_humint_fail" title="@{humint_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="HUMINT roll" name="humint" title="HUMINT roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{HUMINT}}} {{subheader=@{humint}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="HUMINT" title="HUMINT">HUMINT</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="HUMINT rank" title="HUMINT rank">
          <input data-i18n-placeholder="0" name="attr_humint" title="@{humint}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="law fail checkbox" title="law fail checkbox">
          <input name="attr_law_fail" title="@{law_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="law roll" name="law" title="law roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{law}}} {{subheader=@{law}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="law" title="law">law</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="law rank" title="law rank">
          <input data-i18n-placeholder="0" name="attr_law" title="@{law}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="medicine fail checkbox" title="medicine fail checkbox">
          <input name="attr_medicine_fail" title="@{medicine_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="medicine roll" name="medicine" title="medicine roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{medicine}}} {{subheader=@{medicine}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="medicine" title="medicine">medicine</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="medicine rank" title="medicine rank">
          <input data-i18n-placeholder="0" name="attr_medicine" title="@{medicine}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="melee weapons fail checkbox" title="melee weapons fail checkbox">
          <input name="attr_melee_weapons_fail" title="@{melee_weapons_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="melee weapons roll" name="melee weapons" title="melee weapons roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{melee weapons}}} {{subheader=@{melee_weapons}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="melee weapons" title="melee weapons">melee weapons</h3><span data-i18n="(30%)">(30%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="melee weapons rank" title="melee weapons rank">
          <input data-i18n-placeholder="0" name="attr_melee_weapons" title="@{melee_weapons}" placeholder="0" type="number" value="30"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="military science fail checkbox" title="military science fail checkbox">
          <input name="attr_military_science_fail" title="@{military_science_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="military science roll" name="military science" title="military science roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{military science}}} {{subheader=@{military_science}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="military science" title="military science">military science</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="military science rank" title="military science rank">
          <input data-i18n-placeholder="0" name="attr_military_science" title="@{military_science}" placeholder="0" type="number" value="0"/>
        </label>
        <label class="custom-label" data-i18n-title="military science name" title="military science name">
          <textarea data-i18n-placeholder="skill name" name="attr_military_science_name" placeholder="skill name" title="@{military_science_name}" value=""></textarea>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="navigate fail checkbox" title="navigate fail checkbox">
          <input name="attr_navigate_fail" title="@{navigate_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="navigate roll" name="navigate" title="navigate roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{navigate}}} {{subheader=@{navigate}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="navigate" title="navigate">navigate</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="navigate rank" title="navigate rank">
          <input data-i18n-placeholder="0" name="attr_navigate" title="@{navigate}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="occult fail checkbox" title="occult fail checkbox">
          <input name="attr_occult_fail" title="@{occult_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="occult roll" name="occult" title="occult roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{occult}}} {{subheader=@{occult}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="occult" title="occult">occult</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="occult rank" title="occult rank">
          <input data-i18n-placeholder="0" name="attr_occult" title="@{occult}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="persuade fail checkbox" title="persuade fail checkbox">
          <input name="attr_persuade_fail" title="@{persuade_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="persuade roll" name="persuade" title="persuade roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{persuade}}} {{subheader=@{persuade}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="persuade" title="persuade">persuade</h3><span data-i18n="(20%)">(20%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="persuade rank" title="persuade rank">
          <input data-i18n-placeholder="0" name="attr_persuade" title="@{persuade}" placeholder="0" type="number" value="20"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="pharmacy fail checkbox" title="pharmacy fail checkbox">
          <input name="attr_pharmacy_fail" title="@{pharmacy_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="pharmacy roll" name="pharmacy" title="pharmacy roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{pharmacy}}} {{subheader=@{pharmacy}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="pharmacy" title="pharmacy">pharmacy</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="pharmacy rank" title="pharmacy rank">
          <input data-i18n-placeholder="0" name="attr_pharmacy" title="@{pharmacy}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="pilot fail checkbox" title="pilot fail checkbox">
          <input name="attr_pilot_fail" title="@{pilot_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="pilot roll" name="pilot" title="pilot roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{pilot}}} {{subheader=@{pilot}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="pilot" title="pilot">pilot</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="pilot rank" title="pilot rank">
          <input data-i18n-placeholder="0" name="attr_pilot" title="@{pilot}" placeholder="0" type="number" value="0"/>
        </label>
        <label class="custom-label" data-i18n-title="pilot name" title="pilot name">
          <textarea data-i18n-placeholder="skill name" name="attr_pilot_name" placeholder="skill name" title="@{pilot_name}" value=""></textarea>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="psychotherapy fail checkbox" title="psychotherapy fail checkbox">
          <input name="attr_psychotherapy_fail" title="@{psychotherapy_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="psychotherapy roll" name="psychotherapy" title="psychotherapy roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{psychotherapy}}} {{subheader=@{psychotherapy}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="psychotherapy" title="psychotherapy">psychotherapy</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="psychotherapy rank" title="psychotherapy rank">
          <input data-i18n-placeholder="0" name="attr_psychotherapy" title="@{psychotherapy}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
      </div>
      <div class="grid section-skill-col">
        <label class="styled-checkbox" data-i18n-title="ride fail checkbox" title="ride fail checkbox">
          <input name="attr_ride_fail" title="@{ride_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="ride roll" name="ride" title="ride roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{ride}}} {{subheader=@{ride}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="ride" title="ride">ride</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="ride rank" title="ride rank">
          <input data-i18n-placeholder="0" name="attr_ride" title="@{ride}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="science fail checkbox" title="science fail checkbox">
          <input name="attr_science_fail" title="@{science_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="science roll" name="science" title="science roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{science}}} {{subheader=@{science}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="science" title="science">science</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="science rank" title="science rank">
          <input data-i18n-placeholder="0" name="attr_science" title="@{science}" placeholder="0" type="number" value="0"/>
        </label>
        <label class="custom-label" data-i18n-title="science name" title="science name">
          <textarea data-i18n-placeholder="skill name" name="attr_science_name" placeholder="skill name" title="@{science_name}" value=""></textarea>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="search fail checkbox" title="search fail checkbox">
          <input name="attr_search_fail" title="@{search_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="search roll" name="search" title="search roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{search}}} {{subheader=@{search}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="search" title="search">search</h3><span data-i18n="(20%)">(20%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="search rank" title="search rank">
          <input data-i18n-placeholder="0" name="attr_search" title="@{search}" placeholder="0" type="number" value="20"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="SIGINT fail checkbox" title="SIGINT fail checkbox">
          <input name="attr_sigint_fail" title="@{sigint_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="SIGINT roll" name="sigint" title="SIGINT roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{SIGINT}}} {{subheader=@{sigint}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="SIGINT" title="SIGINT">SIGINT</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="SIGINT rank" title="SIGINT rank">
          <input data-i18n-placeholder="0" name="attr_sigint" title="@{sigint}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="stealth fail checkbox" title="stealth fail checkbox">
          <input name="attr_stealth_fail" title="@{stealth_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="stealth roll" name="stealth" title="stealth roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{stealth}}} {{subheader=@{stealth}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="stealth" title="stealth">stealth</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="stealth rank" title="stealth rank">
          <input data-i18n-placeholder="0" name="attr_stealth" title="@{stealth}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="surgery fail checkbox" title="surgery fail checkbox">
          <input name="attr_surgery_fail" title="@{surgery_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="surgery roll" name="surgery" title="surgery roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{surgery}}} {{subheader=@{surgery}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="surgery" title="surgery">surgery</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="surgery rank" title="surgery rank">
          <input data-i18n-placeholder="0" name="attr_surgery" title="@{surgery}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="survival fail checkbox" title="survival fail checkbox">
          <input name="attr_survival_fail" title="@{survival_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="survival roll" name="survival" title="survival roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{survival}}} {{subheader=@{survival}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="survival" title="survival">survival</h3><span data-i18n="(10%)">(10%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="survival rank" title="survival rank">
          <input data-i18n-placeholder="0" name="attr_survival" title="@{survival}" placeholder="0" type="number" value="10"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="swim fail checkbox" title="swim fail checkbox">
          <input name="attr_swim_fail" title="@{swim_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="swim roll" name="swim" title="swim roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{swim}}} {{subheader=@{swim}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="swim" title="swim">swim</h3><span data-i18n="(20%)">(20%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="swim rank" title="swim rank">
          <input data-i18n-placeholder="0" name="attr_swim" title="@{swim}" placeholder="0" type="number" value="20"/>
        </label>
        <div class="horz-line"></div>
        <label class="styled-checkbox" data-i18n-title="unarmed combat fail checkbox" title="unarmed combat fail checkbox">
          <input name="attr_unarmed_combat_fail" title="@{unarmed_combat_fail}" type="checkbox"/>
        </label>
        <button data-i18n-title="unarmed combat roll" name="unarmed combat" title="unarmed combat roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{unarmed combat}}} {{subheader=@{unarmed_combat}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="unarmed combat" title="unarmed combat">unarmed combat</h3><span data-i18n="(40%)">(40%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="unarmed combat rank" title="unarmed combat rank">
          <input data-i18n-placeholder="0" name="attr_unarmed_combat" title="@{unarmed_combat}" placeholder="0" type="number" value="40"/>
        </label>
        <div class="horz-line"></div>
        <label></label>
        <button data-i18n-title="unnatural roll" name="unnatural" title="unnatural roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=^{unnatural}}} {{subheader=@{unnatural}}} {{dice=[[1d100]]}}">
          <h3 data-i18n="unnatural" title="unnatural">unnatural</h3><span data-i18n="(0%)">(0%)</span>
        </button>
        <div class="vert-line"></div>
        <label data-i18n-title="unnatural rank" title="unnatural rank">
          <input data-i18n-placeholder="0" name="attr_unnatural" title="@{unnatural}" placeholder="0" type="number" value="0"/>
        </label>
        <div class="horz-line"></div>
        <div class="repeating-container border-bottom">
          <h3 class="margin-left" data-i18n="foriegn languages and other skills:" data-i18n-title="foriegn languages and other skills:">foriegn languages and other skills:</h3>
          <div class="horz-line"></div>
          <fieldset class="repeating_skills">
            <div class="grid section-repeating border-bottom">
              <label class="styled-checkbox" data-i18n-title="skill fail checkbox" title="skill fail checkbox">
                <input name="attr_fail" title="@{repeating_skills_${x}_fail}" type="checkbox"/>
              </label>
              <label data-i18n-title="skill name" title="skill name">
                <input class="center" data-i18n-placeholder="skill name" name="attr_name" placeholder="skill name" title="@{repeating_skills_${x}_name}" type="text" value=""/>
              </label>
              <button class="dicefontd10" data-i18n-title="skill roll" name="skill roll" title="skill roll" type="roll" value="@{gm_toggle} &amp;{template:rolls} {{header=@{name}}} {{subheader=@{rank}}} {{dice=[[1d100]]}}">k</button>
              <div class="vert-line"></div>
              <label data-i18n-title="skill rank" title="skill rank">
                <input data-i18n-placeholder="0" name="attr_rank" title="@{repeating_skills_${x}_rank}" placeholder="0" type="number" value=""/>
              </label>
            </div>
          </fieldset>
        </div>
      </div>
      <div class="section-directions center"> <span data-i18n="Check a box when you attempt to use a skill and fail. After the session, add 1d4-1 to each checked skill and erase all checks.">Check a box when you attempt to use a skill and fail. After the session, add 1d4-1 to each checked skill and erase all checks.</span></div>
    </div>
  </div>
  <!--INJURIES-->
  <div class="grid header-body injuries border">
    <div class="section-header">
      <h1 data-i18n="injuries" data-i18n-title="injuries">injuries</h1>
    </div>
    <div class="grid section-body border">
      <h2 class="aligned-left" data-i18n="14. wounds and ailments" data-i18n-title="14. wounds and ailments">14. wounds and ailments</h2>
      <div class="border-bottom">
        <textarea data-i18n-placeholder="injuries" name="attr_injuries" placeholder="injuries" title="@{injuries}"></textarea>
      </div>
      <div class="section-directions center"><span data-i18n="Has First Aid been attempted since the last injury?">Has First Aid been attempted since the last injury?</span>
        <label class="styled-checkbox" data-i18n-title="checkbox for first aid" title="checkbox for first aid">
          <input name="attr_injuries_first_aid" type="checkbox"/>
        </label><span data-i18n="yes: only Medicine, Surgery, or long-term rest can help further.">yes: only Medicine, Surgery, or long-term rest can help further.</span>
      </div>
    </div>
  </div>
  <!--EQUIPMENT-->
  <div class="grid header-body equipment border">
    <div class="section-header">
      <h1 data-i18n="equipment" data-i18n-title="equipment">equipment</h1>
    </div>
    <div class="grid section-body border">
      <h2 class="aligned-left" data-i18n="15. armor and gear" data-i18n-title="15. armor and gear">15. armor and gear</h2>
      <div class="border-bottom">
        <textarea data-i18n-placeholder="armor and gear" name="attr_armor_and_gear" placeholder="armor and gear" title="@{armor_and_gear}"></textarea>
      </div>
      <div class="section-directions center border-bottom"><span data-i18n="Body armor reduces the damage of all attacks except Called Shots and successful lethality_percent rolls.">Body armor reduces the damage of all attacks except Called Shots and successful lethality_percent rolls.</span></div>
      <div class="grid section-weapons border-bottom">
        <h2 data-i18n="16. weapons" data-i18n-title="16. weapons" title="16. weapons">16. weapons</h2>
        <div class="vert-line"></div>
        <h2 data-i18n="skill %" data-i18n-title="skill %" title="skill %">skill %</h2>
        <div class="vert-line"></div>
        <h2 data-i18n="base range" data-i18n-title="base range" title="base range">base range</h2>
        <div class="vert-line"></div>
        <h2 data-i18n="damage" data-i18n-title="damage" title="damage">damage</h2>
        <div class="vert-line"></div>
        <h2 data-i18n="armor piercing" data-i18n-title="armor piercing" title="armor piercing">armor piercing</h2>
        <div class="vert-line"></div>
        <h2 data-i18n="lethality_percent %" data-i18n-title="lethality_percent %" title="lethality_percent %">lethality_percent %</h2>
        <div class="vert-line"></div>
        <h2 data-i18n="kill radius" data-i18n-title="kill radius" title="kill radius">kill radius</h2>
        <div class="vert-line"></div>
        <h2 data-i18n="ammo" data-i18n-title="ammo" title="ammo">ammo</h2>
        <div class="vert-line"></div>
      </div>
      <div class="repeating-container border-bottom">
        <fieldset class="repeating_weapons">
          <div class="grid section-weapons border-bottom">
            <label data-i18n-title="weapons input" title="weapons input">
              <input data-i18n-placeholder="weapons" name="attr_weapons" placeholder="weapons" title="@{repeating_weapons_${x}_weapons}" type="text" value=""/>
              <input type="text" name="attr_hasdamage"><input type="text" name="attr_haslethality">
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="skill % input" title="skill % input">
              <input data-i18n-placeholder="skill %" name="attr_skill_percent" placeholder="skill %" title="@{repeating_weapons_${x}_skill_percent}" type="number" value=""/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="base range input" title="base range input">
              <input data-i18n-placeholder="base range" name="attr_base_range" placeholder="base range" title="@{repeating_weapons_${x}_base_range}" type="text" value=""/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="damage input" title="damage input">
              <input data-i18n-placeholder="damage" name="attr_damage" placeholder="damage" title="@{repeating_weapons_${x}_damage}" type="text" value=""/>
              <input name="attr_hasdamage"  type="hidden" value="0"/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="armor piercing input" title="armor piercing input">
              <input data-i18n-placeholder="armor piercing" name="attr_armor_piercing" placeholder="armor piercing" title="@{repeating_weapons_${x}_armor_piercing}" type="text" value=""/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="lethality_percent % input" title="lethality_percent % input">
              <input data-i18n-placeholder="lethality_percent %" name="attr_lethality_percent_percent" placeholder="lethality_percent %" title="@{repeating_weapons_${x}_lethality_percent_percent}" type="number" value=""/>
              <input name="attr_haslethality" type="hidden" value="0"/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="kill radius input" title="kill radius input">
              <input data-i18n-placeholder="kill radius" name="attr_kill_radius" placeholder="kill radius" title="@{repeating_weapons_${x}_kill_radius}" type="text" value=""/>
            </label>
            <div class="vert-line"></div>
            <label data-i18n-title="ammo input" title="ammo input">
              <input data-i18n-placeholder="ammo" name="attr_ammo" placeholder="ammo" title="@{repeating_weapons_${x}_ammo}" type="number" value=""/>
            </label>
            <div class="vert-line"></div>
            <button class="dicefontd10" name="weapon" type="roll" title="weapon roll" value="@{gm_toggle} &amp;{template:rolls} {{header=@{weapons}}} {{subheader=@{skill_percent}}} {{dice=[[1d100]]}} {{hasdamage=[[@{hasdamage}]]}} {{damage=^{damage} [@{damage}](~repeating_weapons_damage)}}  {{damage_critical=^{damage (×2)} [@{damage}](~repeating_weapons_damage_critical)}} {{haslethality=[[@{haslethality}]]}} {{lethality_percent=^{lethality_percent} [@{lethality_percent_percent}%](~repeating_weapons_lethality_percent)}} {{lethality_percent_critical=^{lethality_percent (×2)} [@{lethality_percent_percent}%](~repeating_weapons_lethality_percent_critical)}}">k</button>
            <button class="none" name="roll_damage" type="roll" value="@{gm_toggle} &amp;{template:damage} {{header=@{weapons}}} {{subheader=@{damage}}} {{damage=[[@{damage}]]}}"></button>
            <button class="none" name="roll_lethality_percent" type="roll" value="@{gm_toggle} &amp;{template:lethality_percent} {{header=@{weapons}}} {{subheader=@{lethality_percent_percent}}}{{lethality_percent_rating=[[@{lethality_percent_percent}]]}} {{lethality_percent=[[1d100]]}}"></button>
            <button class="none" name="roll_damage_critical" type="roll" value="@{gm_toggle} &amp;{template:damage} {{header=@{weapons}}} {{subheader=@{damage}}} {{damage=[[@{damage}*2]]}}"></button>
            <button class="none" name="roll_lethality_percent_critical" type="roll" value="@{gm_toggle} &amp;{template:lethality_percent_critical} {{header=@{weapons}}} {{subheader=@{lethality_percent_percent}}} {{lethality_percent_rating=[[@{lethality_percent_percent}*2]]}} {{lethality_percent=[[1d100]]}}"></button>
          </div>
        </fieldset>
      </div>
    </div>
  </div>
  <!--REMARKS-->
  <div class="grid header-body remarks border">
    <div class="section-header">
      <h1 data-i18n="remarks" data-i18n-title="remarks">remarks</h1>
    </div>
    <div class="grid section-body border">
      <div class="section border-bottom">
        <h2 class="aligned-left" data-i18n="17. personal details and notes" data-i18n-title="17. personal details and notes">17. personal details and notes</h2>
        <textarea name="attr_personal_details_and_notes" placeholder="personal details and notes" title="@{personal_details_and_notes}"></textarea>
      </div>
      <div class="vert-line"></div>
      <div class="section border-bottom">
        <div class="section border-bottom">
          <h2 class="aligned-left" data-i18n="18. developments which affect home and family" data-i18n-title="18. developments which affect home and family">18. developments which affect home and family</h2>
          <textarea data-i18n-placeholder="developments which affect home and family" name="attr_developments_which_affect_home_and_family" placeholder="developments which affect home and family" title="@{developments_which_affect_home_and_family}"></textarea>
        </div>
        <div class="grid section-19 border-bottom">
          <h2 class="aligned-left" data-i18n="19. special training" data-i18n-title="19. special training">19. special training</h2>
          <div class="vert-line"></div>
          <h2 class="aligned-left" data-i18n="skill or stat used" data-i18n-title="skill or stat used">skill or stat used</h2>
        </div>
        <div class="repeating-container border-bottom">
          <fieldset class="repeating_special">
            <div class="grid section-19 border-bottom">
              <label data-i18n-title="special training input" title="special training input">
                <input name="attr_special_training" placeholder="special training" title="@{repeating_weapons_${x}_special_training}" type="text" value=""/>
              </label>
              <div class="vert-line"></div>
              <label data-i18n-title="skill or stat used" title="skill or stat used">
                <input data-i18n-placeholder="skill or stat used" name="attr_skill_or_stat_used" placeholder="skill or stat used" title="@{repeating_weapons_${x}_skill_or_stat_used}" type="text" value=""/>
              </label>
            </div>
          </fieldset>
        </div>
      </div>
      <div class="section-directions center"><span data-i18n="Please indicate why this agent was recruited and why the agent agreed to be recruited.">Please indicate why this agent was recruited and why the agent agreed to be recruited.</span></div>
    </div>
  </div>
  <!--AUTHORIZING OFFICER-->
  <div class="grid authorizing-officer border">
    <div class="section">
      <h2 class="margin-left" data-i18n="20. authorizing officer" data-i18n-title="20. authorizing officer">20. authorizing officer</h2>
      <label data-i18n-title="authorizing officer" title="authorizing officer">
        <input data-i18n-placeholder="authorizing officer" name="attr_authorizing_officer" placeholder="authorizing officer" title="authorizing officer" type="text" value=""/>
      </label>
    </div>
    <div class="vert-line"></div>
    <div class="section">
      <h2 class="margin-left" data-i18n="21. agent signature" data-i18n-title="21. agent signature">21. agent signature</h2>
      <label data-i18n-title="agent signature" title="agent signature">
        <input data-i18n-placeholder="agent signature" name="attr_agent_signature" placeholder="agent signature" title="agent signature" type="text" value=""/>
      </label>
    </div>
  </div>
  <!--BOTTOM DECORATION-->
  <div class="grid section-bottom-decor"><span class="uppercase" data-i18n="DD">DD</span><span class="uppercase" data-i18n="united states form">united states form</span><span data-i18n="315">315</span><span class="uppercase" data-i18n="top secret//orcon//special access required delta green agent documenation sheet">top secret//orcon//special access required delta green agent documenation sheet <span name="attr_version"></span></span><span data-i18n="112382">112382</span></div>
</div>
<!-- ROLL TEMPLATE-->
<!-- =============================-->
<div class="rolltemplates">
  <rolltemplate class="sheet-rolltemplate-rolls">
    <div class="sheet-template-container">{{#header}}
      <div class="sheet-template-header">
        <h1>{{header}} </h1>
        <h2>{{#subheader}}({{subheader}}%){{/subheader}}</h2>
      </div>{{/header}}
      <div class="sheet-template-body">{{#dice}}
        <div class="sheet-template-row"><span class="inlinerollresult">{{dice}}</span><span class="percent">%</span></div>{{/dice}}
        {{#rollTotal() hasdamage 1}}
        <div class="sheet-template-row"> <span class="inlinerollresult">{{damage}}</span></div>
        <div class="sheet-template-row"> <span class="inlinerollresult">{{damage_critical}}</span></div>{{/rollTotal() hasdamage 1}}
        {{#rollTotal() haslethality 1}}
        <div class="sheet-template-row"> <span class="inlinerollresult">{{lethality_percent}}</span></div>
        <div class="sheet-template-row"> <span class="inlinerollresult">{{lethality_percent_critical}}</span></div>{{/rollTotal() haslethality 1}}
        {{#desc}}
        <div class="sheet-template-row"><span class="sheet-template-desc">{{desc}}</span></div>{{/desc}}	
      </div>
    </div>
  </rolltemplate>
</div>
<div class="rolltemplates">
  <rolltemplate class="sheet-rolltemplate-damage">
    <div class="sheet-template-container">{{#header}}
      <div class="sheet-template-header">
        <h1>{{header}} </h1>
        <h2>{{#subheader}}({{subheader}}){{/subheader}}</h2>
      </div>{{/header}}
      <div class="sheet-template-body">
        <div class="sheet-template-row"> <span class="inlinerollresult">{{damage}}</span></div>
      </div>
    </div>
  </rolltemplate>
</div>
<div class="rolltemplates">
  <rolltemplate class="sheet-rolltemplate-lethality_percent">
    <div class="sheet-template-container">{{#header}}
      <div class="sheet-template-header">
        <h1>{{header}} </h1>
        <h2>({{subheader}}%)</h2>
      </div>{{/header}}
      <div class="sheet-template-body">
        <div class="sheet-template-row"><span class="inlinerollresult">{{lethality_percent}}</span><span class="percent">%</span></div>{{#rollLess() lethality_percent lethality_percent_rating}}
        <div class="sheet-template-row"><span class="inlinerollresult">Kill</span></div>{{/rollLess() lethality_percent lethality_percent_rating}}
      </div>
    </div>
  </rolltemplate>
</div>
<div class="rolltemplates">
  <rolltemplate class="sheet-rolltemplate-lethality_percent_critical">
    <div class="sheet-template-container">{{#header}}
      <div class="sheet-template-header">
        <h1>{{header}} </h1>
        <h2>({{subheader}}%)</h2>
      </div>{{/header}}
      <div class="sheet-template-body">
        <div class="sheet-template-row"><span class="inlinerollresult">{{lethality_percent}}</span><span class="percent">%</span></div>{{#rollLess() lethality_percent lethality_percent_rating}}
        <div class="sheet-template-row"><span class="inlinerollresult">Kill</span></div>{{/rollLess() lethality_percent lethality_percent_rating}}
      </div>
    </div>
  </rolltemplate>
</div>
<div class="rolltemplates">
  <rolltemplate class="sheet-rolltemplate-stats">
    <div class="sheet-template-container">{{#header}}
      <div class="sheet-template-header">
        <h1>{{header}} </h1>
        <h2>{{#subheader}}({{subheader}}%){{/subheader}}</h2>
      </div>{{/header}}
      <div class="sheet-template-body">{{#dice}}
        <div class="sheet-template-row"><span class="inlinerollresult">{{dice}}</span><span class="percent">%</span></div>{{#rollLess() stat 20}}
        {{#^rollGreater() dice score}}
        {{#rollTotal() dice 1}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 1}}
        {{#rollBetween() dice 2 10}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 2 10}}
        {{#rollTotal() dice 11}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 11}}
        {{#rollBetween() dice 12 21}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 12 21}}
        {{#rollTotal() dice 22}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 22}}
        {{#rollBetween() dice 23 32}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 23 32}}
        {{#rollTotal() dice 33}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 33}}
        {{#rollBetween() dice 34 43}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 34 43}}
        {{#rollTotal() dice 44}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 44}}
        {{#rollBetween() dice 45 54}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 45 54}}
        {{#rollTotal() dice 55}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 55}}
        {{#rollBetween() dice 56 65}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 56 65}}
        {{#rollTotal() dice 66}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 66}}
        {{#rollBetween() dice 67 76}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 67 76}}
        {{#rollTotal() dice 77}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 77}}
        {{#rollBetween() dice 78 87}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 78 87}}
        {{#rollTotal() dice 88}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 88}}
        {{#rollBetween() dice 89 98}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 89 98}}
        {{#rollTotal() dice 99}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 99}} 		
        {{/^rollGreater() dice score}}		
        {{#rollGreater() dice score}}
        {{#rollTotal() dice 100}}
        <div class="sheet-template-row"><span class="inlinerollresult">Fumble</span></div>{{/rollTotal() dice 100}}
        {{#rollBetween() dice 2 10}}
        <div class="sheet-template-row"><span class="inlinerollresult">Failure</span></div>{{/rollBetween() dice 2 10}}
        {{#rollTotal() dice 11}}
        <div class="sheet-template-row"><span class="inlinerollresult">Fumble</span></div>{{/rollTotal() dice 11}}
        {{#rollBetween() dice 12 21}}
        <div class="sheet-template-row"><span class="inlinerollresult">Failure</span></div>{{/rollBetween() dice 12 21}}
        {{#rollTotal() dice 22}}
        <div class="sheet-template-row"><span class="inlinerollresult">Fumble</span></div>{{/rollTotal() dice 22}}
        {{#rollBetween() dice 23 32}}
        <div class="sheet-template-row"><span class="inlinerollresult">Failure</span></div>{{/rollBetween() dice 23 32}}
        {{#rollTotal() dice 33}}
        <div class="sheet-template-row"><span class="inlinerollresult">Fumble</span></div>{{/rollTotal() dice 33}}
        {{#rollBetween() dice 34 43}}
        <div class="sheet-template-row"><span class="inlinerollresult">Failure</span></div>{{/rollBetween() dice 34 43}}
        {{#rollTotal() dice 44}}
        <div class="sheet-template-row"><span class="inlinerollresult">Fumble</span></div>{{/rollTotal() dice 44}}
        {{#rollBetween() dice 45 54}}
        <div class="sheet-template-row"><span class="inlinerollresult">Failure</span></div>{{/rollBetween() dice 45 54}}
        {{#rollTotal() dice 55}}
        <div class="sheet-template-row"><span class="inlinerollresult">Fumble</span></div>{{/rollTotal() dice 55}}
        {{#rollBetween() dice 56 65}}
        <div class="sheet-template-row"><span class="inlinerollresult">Failure</span></div>{{/rollBetween() dice 56 65}}
        {{#rollTotal() dice 66}}
        <div class="sheet-template-row"><span class="inlinerollresult">Fumble</span></div>{{/rollTotal() dice 66}}
        {{#rollBetween() dice 67 76}}
        <div class="sheet-template-row"><span class="inlinerollresult">Failure</span></div>{{/rollBetween() dice 67 76}}
        {{#rollTotal() dice 77}}
        <div class="sheet-template-row"><span class="inlinerollresult">Fumble</span></div>{{/rollTotal() dice 77}}
        {{#rollBetween() dice 78 87}}
        <div class="sheet-template-row"><span class="inlinerollresult">Failure</span></div>{{/rollBetween() dice 78 87}}
        {{#rollTotal() dice 88}}
        <div class="sheet-template-row"><span class="inlinerollresult">Fumble</span></div>{{/rollTotal() dice 88}}
        {{#rollBetween() dice 89 98}}
        <div class="sheet-template-row"><span class="inlinerollresult">Failure</span></div>{{/rollBetween() dice 89 98}}
        {{#rollTotal() dice 99}}
        <div class="sheet-template-row"><span class="inlinerollresult">Fumble</span></div>{{/rollTotal() dice 99}} 			
        {{/rollGreater() dice score}}		
        {{/rollLess() stat 20}}
        {{#^rollLess() stat 20}}	
        {{#^rollGreater() dice stat}}
        {{#rollTotal() dice 100}}
        <div class="sheet-template-row"><span class="inlinerollresult">Fumble  </span></div>{{/rollTotal() dice 100}}
        {{#^rollTotal() dice 100}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical  </span></div>{{/^rollTotal() dice 100}}
        {{/^rollGreater() dice stat}}
        {{#rollGreater() dice stat}}
        {{#rollBetween() dice 12 21}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 12 21}}
        {{#rollTotal() dice 22}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 22}}
        {{#rollBetween() dice 23 32}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 23 32}}
        {{#rollTotal() dice 33}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 33}}
        {{#rollBetween() dice 34 43}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 34 43}}
        {{#rollTotal() dice 44}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 44}}
        {{#rollBetween() dice 45 54}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 45 54}}
        {{#rollTotal() dice 55}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 55}}
        {{#rollBetween() dice 56 65}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 56 65}}
        {{#rollTotal() dice 66}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 66}}
        {{#rollBetween() dice 67 76}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 67 76}}
        {{#rollTotal() dice 77}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 77}}
        {{#rollBetween() dice 78 87}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 78 87}}
        {{#rollTotal() dice 88}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 88}}
        {{#rollBetween() dice 89 98}}
        <div class="sheet-template-row"><span class="inlinerollresult">Success</span></div>{{/rollBetween() dice 89 98}}
        {{#rollTotal() dice 99}}
        <div class="sheet-template-row"><span class="inlinerollresult">Critical</span></div>{{/rollTotal() dice 99}} 
        {{#rollTotal() dice 100}}
        <div class="sheet-template-row"><span class="inlinerollresult">Fumble</span></div>{{/rollTotal() dice 100}} 
        {{/rollGreater() dice stat}}
        {{/^rollLess() stat 20}}
        {{/dice}}
        {{#damage}}
        <div class="sheet-template-row"> <span class="inlinerollresult">{{damage}}</span></div>{{/damage}}
        {{#desc}}
        <div class="sheet-template-row"><span class="sheet-template-desc">{{desc}}</span></div>{{/desc}}	
      </div>
    </div>
  </rolltemplate>
</div>
<!--SHEETWORKERS-->
<!-- =============================-->
<script type="text/worker">	// === ATTRIBUTE ARRAYS
	// note: I had the underscore in front of the arrays key to distinguish it from the name of the attribute
		const arrays = {
			_stats: ['strength', 'constitution', 'dexterity', 'intelligence', 'power', 'charisma'],
			_hit_points: ['strength_score', 'constitution_score'],
			_sanity_points: ['power_score'], //ALSO USED FOR BREAKING POINTS
			_willpower_points: ['power_score'],
			_toggles: ['settings']
		};

		
	
	// === SHARED FUNCTIONS
	const setAttributes = (update, silent) => { 
		(silent === true) ? setAttrs(update, {silent:true}) : setAttrs(update); 
	};

	// === STAT SCORES
	arrays['_stats'].forEach(attr => {
		on(`change:${attr}_score`, (eventinfo) => {
			const score = parseInt(eventinfo.newValue) || 0;
			setAttributes({[`${attr}`]: score * 5}, true);
		});
	});

	// === HIT POINTS
	// First time player set you
	arrays['_hit_points'].forEach(attr => {
		on(`change:${attr}`, (eventInfo) => {
			// Check if STR or CON has been changed, if changed the relative initial flag is set to 0
			if (eventInfo.sourceAttribute === 'strength_score'){
				setAttributes({initial_str:0}, true);
			} else if (eventInfo.sourceAttribute === 'constitution_score'){
				setAttributes({initial_con:0}, true);
			}
			getAttrs(['initial_str','initial_con','initial_hp'],function(v){
				let flag1=(parseInt(v.initial_con)||0);
				let flag2=(parseInt(v.initial_str)||0);
				// This flag is 0 if both CON and STR has been initialized, otherwise it is 1
				let flag_stats = flag1+flag2;
				// This flag is 0 if the initial value for current hp has already been initialized, otherwise it is 1
				let flag_hp=(parseInt(v.initial_hp)||0);
				if (flag_stats == 0){
					const attributes = arrays['_hit_points'].concat(['hit_points']);
					if (flag_hp == 1){
						getAttrs(attributes, (values) => {
							const strength = parseInt(values.strength_score) || 0, constitution = parseInt(values.constitution_score) || 0; 
							const calculated = Math.ceil((strength + constitution)/2);
							let update = {
								hit_points_max: calculated,
								hit_points    : calculated,
								initial_hp    : 0
							}
							setAttributes(update, true);
						});
					} else {
						getAttrs(attributes, (values) => {
							const strength = parseInt(values.strength_score) || 0, constitution = parseInt(values.constitution_score) || 0; 
							const calculated = Math.ceil((strength + constitution)/2);
							let update = {
								hit_points_max: calculated
							}
							setAttributes(update, true);
						});
					}
					
				} 
			});
		});
	});

	
	// === WILLPOWER POINTS
	arrays['_willpower_points'].forEach(attr => {
		on(`change:${attr}`, (eventinfo) => {
			const attributes = arrays['_willpower_points'].concat(['willpower_points']);
			getAttrs(attributes, (values) => {
				const calculated = parseInt(values.power_score) || 0; 
				let update = { 
					willpower_points_max: calculated 
				}
				setAttributes(update, true);
			});
		});
	});

	// === SANITY POINTS & BREAKING POINT
	arrays['_sanity_points'].forEach(attr => {
		on(`change:${attr}`, (eventinfo) => {
			const attributes = arrays['_sanity_points'].concat(['sanity_points', 'breaking_point','initial_san']);
			getAttrs(attributes, (values) => {
				const flag_initial_san=parseInt(values.initial_san)||0,zero=0;
				// Only updated the BP and Current Sanity if it is a new character
				if (flag_initial_san==1){
					const power = parseInt(values.power_score) || 0, calculatedSanity = power*5, calculatedBreakingPoint = power*4; calculatedWillPower = power; 
					let update = { 
						willpower_points: calculatedWillPower,
						sanity_points: calculatedSanity,
						breaking_point: calculatedBreakingPoint,
						breaking_point_max: calculatedBreakingPoint,
						initial_san:zero
					}
					setAttributes(update, true);
				}
			});
		});
	});
	// new function to compute san point max
	on("sheet:opened change:unnatural", function() {
		getAttrs(['unnatural'], function(values) {
			setAttrs({sanity_points_max: 99-Math.floor(values.unnatural)});
		});
	});
	
	// === TOGGLE INPUT SETTINGS
    arrays['_toggles'].forEach(attr => {
        on(`clicked:toggle_${attr}`, () => {
        	getAttrs(['toggles'], (values) => {
 				let string = toggleBuilder(attr, v['toggles']);
                setAttributes({toggles: string}, true);
        	});
        });
    });

	// === UPDATE TOGGLE STRING
	const toggleBuilder = (attr, oldString) => {
        let newString = (oldString.includes(`${attr}`)) ? oldString.replace(`${attr},`, '') : `${oldString}${attr},`;
        return newString
	};


	// === SHEET VERSIONING
	on('sheet:opened', () => {
		getAttrs(['version'], values => { versioning(parseFloat(values.version) || 1); });
	});			

	const versioning = (version) => {
	   
	   if (version < 1.05) {
		   version_0_105();
	    } 
		else if (version <1.5) {
			version_105_150();
		}
	};

	// UPDATE TO VERSION 1.05
	const version_0_105= () => {
		getAttrs(['version'], function(v) {
			let codeversion=1.05;
			let update={version: codeversion,
						 initial_san: 0,
						 initial_hp:  0,
						 initial_str: 0,
						 initial_con: 0
			};
			setAttrs(update, //Update attributes
				{silent:true},  // will not trigger sheet workers
				versioning(codeversion)); // call versioning again
		});
	};
	// UPDATE TO VERSION 1.5
	const version_105_150 = () => {
		
		let codeversion=1.5;
		let update={};
		
		getSectionIDs(`weapons`,idarray=>{
	   
	   console.info(idarray);
			let fieldnames=['sheet_type','version'];
	        
			idarray.forEach(id => {
        	        
					fieldnames.push(`repeating_weapons_${id}_damage`,`repeating_weapons_${id}_lethality_percent_percent`,`repeating_weapons_${id}_attack`);
			});
	   		getAttrs(fieldnames,function(v) {
        	   
        	   console.info(v);
        	   update['version']=codeversion;
        	   console.info(update);
				idarray.forEach(id=>{
				    
					if (v[`repeating_weapons_${id}_damage`]===""){
					    update["repeating_weapons_"+id+"_hasdamage"]="0";
        	   console.info(update);
					} else{
					    update["repeating_weapons_"+id+"_hasdamage"]="1";
        	   console.info(update);
					}
						
					if (v[`repeating_weapons_${id}_lethality_percent_percent`]>0){
					    update["repeating_weapons_"+id+"_haslethality"]="1";
        	   console.info(update);
					} else {
					    update["repeating_weapons_"+id+"_haslethality"]="0";
        	   console.info(update);
					}
					if (v['sheet_type']==='npc'){
					    update["repeating_weapons_"+id+"_weapons"]=v[`repeating_weapons_${id}_attack`];
					}
    			});
    			
    		   
        	   console.info(update);
        		setAttrs(update, //Update attributes
        				{silent:true},  // will not trigger sheet workers
        				versioning(codeversion)); // call versioning again
				
			});
		});
	};

	
// UPDATE THE VALUE OF THE BOND IN THE REPEATING SECTION WHEN CREATED
	on("change:repeating_bonds",function(){
		getAttrs(["repeating_bonds_flag","charisma_score"],function(value){
			if (value["repeating_bonds_flag"]==0){
				let update={
							repeating_bond_score:value["charisma_score"],
							repeating_bond_flag:1
							};
				setAttributes(update,true);
			}
		});
	});

// CHECK IF DAMAGE OR lethality_percent EXISTS
	on("change:repeating_weapons",function(){
		getAttrs(['repeating_weapons_damage','repeating_weapons_lethality_percent_percent'],function(value){
			let update={};
			if (value['repeating_weapons_damage']===""){
				update['repeating_weapons_hasdamage']=0;
			}else{
				update['repeating_weapons_hasdamage']=1;
			}
			
			if (value['repeating_weapons_lethality_percent_percent']>0){
				update['repeating_weapons_haslethality']=1;
			}else{
				update['repeating_weapons_haslethality']=0;
			}
			setAttributes(update,true);
		});
	});

</script>